<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Symfony\Component\Console\Helper\Table;

class AddUserWxid extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		//添加微信 openid
		Schema::table('user', function(Blueprint $table){
			$table->string('wx_openid', 60)->nullable()->default('');
			$table->integer('reset_time')->nullable()->default(0);
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('user', function(Blueprint $table){
			$table->dropColumn('wx_openid');
			$table->dropColumn('reset_time');
		});
	}

}
